<?php

class GuardLoginPage extends Page
{
    public function canView($member = null)
    {
        $result = parent::canView($member);

        if ($result && $mem = Member::currentUser()) {
            $whiteList = array("administrator");
            return $mem->inGroups($whiteList);
        }

        return $result;
    }
}

class GuardLoginPage_Controller extends Page_Controller
{
    public function init()
    {
        return $this->redirect(VacCodeVerifyPage::get()->first()->Link());
    }
}